from sqlalchemy.orm import DeclarativeBase


class Base(DeclarativeBase):

    def as_dict(self):
        return {k: v for k, v in self.__dict__.items() if not k.startswith('_')}